package com.sophossystems.client.asmon.dao;

import com.sophossystems.client.asmon.dao.RoleDao;
import com.sophossystems.client.asmon.dto.RoleDTO;
import com.sophossystems.client.asmon.dto.RolePkDTO;
import com.sophossystems.client.asmon.exceptions.DaoException;
import java.util.List;

public interface RoleDao {
	/**
	 * Method 'insert'
	 * 
	 * @param dto
	 * @return RolePk
	 */
	public RolePkDTO insert(final RoleDTO dto);

	/**
	 * Updates a single row in the Role table.
	 */
	public void update(final RoleDTO dto) throws DaoException;

	/**
	 * Deletes a single row in the Role table.
	 */
	public void delete(final RolePkDTO pk) throws DaoException;

	/**
	 * Returns all rows from the Role table that match the criteria 'idRole =
	 * :idRole'.
	 */
	public RoleDTO findByPrimaryKey(final int idRole) throws DaoException;

	/**
	 * Returns all rows from the Role table that match the criteria ''.
	 */
	public List<RoleDTO> findAll() throws DaoException;


	/**
	 * Returns all rows from the Role table that match the criteria 'Name =
	 * :name'.
	 */
	public List<RoleDTO> findWhereNameEquals(String name) throws DaoException;

	/**
	 * Returns all rows from the Role table that match the criteria
	 * 'idRoleSuperior = :idRoleSuperior'.
	
	public List<RoleDTO> findWhereIdRoleSuperiorEquals(int idRoleSuperior)
			throws DaoException; */

	public RolePkDTO findLastInsert() throws DaoException;
	
}
